// 资质认证相关
import request from '../utils/request.js'

//获取资质列表
const qualificateList = () => {
  return request({
    url: '/api/auth/qualificate/list',
    method: 'POST'
  })
}

// 参赛者拥有的资质
const qualificateDetail = id => {
  return request({
    url: '/api/auth/qualificate/own/' + id,
    method: 'POST'
  })
}

// 查看最近提交的资质申请状态
const qualificateData = id => {
  return request({
    url: '/api/auth/qualificate/get/'+id,
    method: 'POST'
  })
}

// 提交申请
const qualificateApply = data => {
  return request({
    url: '/api/auth/apply',
    method: 'POST',
    data
  })
}
//获取资质申请详情
const qualificateApplyDetail = id => {
  return request({
    url: '/api/auth/apply/'+id,
    method: 'POST'
  })
}

// 获取申请资质列表
const getQualificateList = id => {
  return request({
    url: '/api/auth/apply/list/'+id,
    method: 'POST'
  })
}

module.exports = {
  qualificateList,
  qualificateDetail,
  qualificateData,
  qualificateApply,
  qualificateApplyDetail,
  getQualificateList
}